<html>
<head><meta charset="utf-8"><title>Issue #67738 · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Issue.20.2367738.html">Issue #67738</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="195692971"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Issue%20%2367738/near/195692971" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Issue.20.2367738.html#195692971">(Apr 29 2020 at 11:13)</a>:</h4>
<p><a href="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=6b4b610a58ee3236b8df1d5f776d578e" title="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=6b4b610a58ee3236b8df1d5f776d578e">https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=6b4b610a58ee3236b8df1d5f776d578e</a></p>



<a name="195693040"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Issue%20%2367738/near/195693040" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Issue.20.2367738.html#195693040">(Apr 29 2020 at 11:14)</a>:</h4>
<p>In the above code snippet, if we uncomment the impl, it stops compiling</p>



<a name="195693064"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Issue%20%2367738/near/195693064" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Issue.20.2367738.html#195693064">(Apr 29 2020 at 11:14)</a>:</h4>
<p>The <code>where &lt;T as Foo&lt;'a&gt;&gt;::X: 'static&gt;</code> does not seem to be taken into account</p>



<a name="195693084"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Issue%20%2367738/near/195693084" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Issue.20.2367738.html#195693084">(Apr 29 2020 at 11:15)</a>:</h4>
<p>But if we remove the 'a parametrization (see the <code>StaticFoo</code> / <code>StaticBaz</code>) formulation, it works</p>



<a name="195693176"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Issue%20%2367738/near/195693176" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Issue.20.2367738.html#195693176">(Apr 29 2020 at 11:16)</a>:</h4>
<p>And moreover if we express the same constraint over a pair of functions instead (<code>foo</code> / <code>only_static</code>), it works too</p>



<a name="195693197"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Issue%20%2367738/near/195693197" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Issue.20.2367738.html#195693197">(Apr 29 2020 at 11:16)</a>:</h4>
<p>This makes me believe that the commented impl should be accepted</p>



<a name="195693271"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Issue%20%2367738/near/195693271" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scalexm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Issue.20.2367738.html#195693271">(Apr 29 2020 at 11:17)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> is that an issue that you are aware of? I found <a href="https://github.com/rust-lang/rust/issues/67738" title="https://github.com/rust-lang/rust/issues/67738">https://github.com/rust-lang/rust/issues/67738</a> which is equivalent, + a workaround by dtolnay</p>



<a name="195708635"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Issue%20%2367738/near/195708635" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Issue.20.2367738.html#195708635">(Apr 29 2020 at 13:31)</a>:</h4>
<p>I'm aware of this</p>



<a name="195708665"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Issue%20%2367738/near/195708665" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Issue.20.2367738.html#195708665">(Apr 29 2020 at 13:31)</a>:</h4>
<p>I...think</p>



<a name="195708771"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Issue%20%2367738/near/195708771" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Issue.20.2367738.html#195708771">(Apr 29 2020 at 13:32)</a>:</h4>
<p>I feel like there was a related issue having to do with impl Trait and async fn...</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>